-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[DOC] Update ubuntu install instructions from source #14534
Conversation
@mxnet-label-bot add [Doc, Installation, pr-awaiting-review] |
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
.. | ||
ninja |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-DUSE_MKLDNN
will be turned on by default in this cmake line? Seems we need change the description in the next section and document the default behavior somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MKL install requires additional steps in Ubuntu that are not part of the installation, so it's disabled. by -DUSE_MKL_IF_AVAILABLE=OFF even if any other MKL variables are on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All MKL is disabled, check the end of the line: /~https://github.com/apache/incubator-mxnet/blob/master/CMakeLists.txt#L31
docs/install/ubuntu_setup.md
Outdated
|
||
```bash | ||
export LD_LIBRARY_PATH=$PWD/lib | ||
export LD_LIBRARY_PATH=`realpath build` | ||
export MXNET_LIBRARY_PATH=`realpath build/libmxnet.so` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will this env variable be used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MXNET_LIBRARY_PATH when loading the library from python.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why do we need this? It seems to work fine without having to set this env variable earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was there in the instructions already. I agree is not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was there in the instructions already. I agree is not necessary.
I could not find it in the instructions before this PR. If not necessary, can we not add it to the doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I'm indifferent. While it can help debugging we can remove to keep the instructions lean. As you can see in the patch it was there already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor suggestions.
``` | ||
|
||
**For Ubuntu 18.04 and CUDA builds you need to update CMake** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the implication for older Ubuntu OS? Is there a version >= that must be met?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For older versions the distribution's provided CMake is working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we clarify that in the doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I guess it is fine if there is no action required.
sudo apt remove --purge --auto-remove cmake | ||
|
||
# Update CMAKE for correct cuda autotedetection: /~https://github.com/clab/dynet/issues/1457 | ||
version=3.14 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting in version number in the docs makes them go stale pretty fast. Is there a way to consolidate versions in a file so it can be managed there instead of sprinkled throughout code blocks in the docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine. This is the minimum version that works with ubuntu 18.04 I think is ok to put it there, and people can update it. If you put an indirect reference becomes more messy to maintain.
echo "USE_BLAS = openblas" >> ./config.mk | ||
make -j $(nproc) | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should put something here instead of having two code blocks back to back... some description...
@larroy Is this PR good to merge now ? |
cmake -GNinja \ | ||
-DUSE_CUDA=OFF \ | ||
-DUSE_MKL_IF_AVAILABLE=OFF \ | ||
-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not an expert in cmake but is ccache a de facto build option for cmake build system? Can we leave this option to user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be enabled explicitly with this flag, is not default. I think we should enable it in our instructions to speed up development process. Otherwise it becomes an obscure trick.
@piyushghai up to reviewers to approve or follow up on the changes / made additional requests. @apeforest @aaronmarkham |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with the current changes here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me. Just one small comment added. Thanks!
Co-Authored-By: larroy <pedro.larroy.lists@gmail.com>
Restarted CI (Julia test failed for some reason... let's see if gets though this time...) |
@aaronmarkham @apeforest are we good to merge? |
* Update ubuntu install instructions from source * Update docs/install/ubuntu_setup.md Co-Authored-By: larroy <pedro.larroy.lists@gmail.com> * Address CR comments * Address CR comments
Description
This PR updates ubuntu install instructions by using CMake and adding steps needed to update CMake on ubuntu 18.04 otherwise developers get nontrivial error messages.
@aaronmarkham
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.